Field of the Invention
The present invention relates to an information processing apparatus, a method for controlling the information processing apparatus, and a storage medium.
Description of the Related Art
With Hypertext Transfer Protocol (HTTP), an information processing apparatus establishes one connection with a server and performs data communication with the server. As a technique for performing this data communication more efficiently, in a known technique, a plurality of connections is established between the information processing apparatus and the server, and data blocks into which original data to be sent is divided are transmitted and received by using the plurality of connections. Hereinafter, transmission and reception of data blocks by using a plurality of connections is referred to as multi-connection communication.
Performing multi-connection communication enables using a plurality of connections in parallel and therefore achieves more efficient data communication than data communication by using one connection. Japanese Patent Application Laid-Open No. 2012-95098 discusses a technique in which an information processing apparatus notifies a server of the maximum number of connections, and the server communicates with the information processing apparatus according to the maximum number of connections indicated by the received notification.
When the information processing apparatus transmits data blocks to the server by using a plurality of connections, the information processing apparatus includes Content-Range information in the header of an HTTP packet and transmits data blocks to the server. When the server receives this HTTP packet, the server refers to the Content-Range information in the header to enable the combination of the plurality of received data blocks into one piece of original data by using the plurality of connections.
However, since specific header information such as the Content-Range information is not necessarily supported, multi-connection communication is not supported by some servers. Performing multi-connection communication on a server not supporting multi-connection communication will cause error termination, and the information processing apparatus will become unable to communicate with the server.